package com.bezdelnick.forum.web.tile.upload_resource;

import com.bezdelnick.forum.web.WicketApplication;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.protocol.http.WebApplication;
import org.brixcms.jcr.wrapper.BrixNode;
import org.brixcms.plugin.site.SimpleCallback;
import org.brixcms.plugin.site.page.tile.Tile;
import org.brixcms.plugin.site.page.tile.admin.EmptyTileEditorPanel;
import org.brixcms.plugin.site.page.tile.admin.TileEditorPanel;
import org.brixcms.plugin.site.resource.admin.UploadResourcesPanel;

/**
 * Created by IntelliJ IDEA.
 * User: Bezdelnick
 * Date: 26.08.12
 * Time: 13:32
 * To change this template use File | Settings | File Templates.
 */
public class UploadResourceTile implements Tile {
    @Override
    public String getDisplayName() {
        return "Upload resource tile";
    }

    @Override
    public String getTypeName() {
        return "brix.tile.UploadResource";
    }

    @Override
    public TileEditorPanel newEditor(String id, IModel<BrixNode> tileContainerNode) {
        return new EmptyTileEditorPanel(id);
    }

    @Override
    public Component newViewer(String id, IModel<BrixNode> tileNode) {
        SimpleCallback simpleCallback = new SimpleCallback(){
            @Override
            public void execute() {
                //To change body of implemented methods use File | Settings | File Templates.
            }
        };
        return new UploadResourcesPanel(id, tileNode, simpleCallback);
    }

    @Override
    public boolean requiresSSL(IModel<BrixNode> tileNode) {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
